require('../css/commonCss/normalize.css')
require('../css/commonCss/basic.css')
require('../css/commonCss/property.css')
require('../css/commonCss/reset.css')
require('../liabs/iconfont/iconfont.css')
require('../css/commonCss/footer.less')
require('../css/number.less')


/* 
  获取元素
*/
const number = document.querySelector('.number')
const go = document.querySelector('.go')


//文档加载
document.addEventListener('DOMContentLoaded',function(){
    console.log(number)


    //3秒倒计时
    function setTime(){
        let time = 3;
        setInterval(function(){
            time--;

            if(time<0){
                location.href = './sport.html';
            }else if(time === 0){
                number.textContent = go.textContent;
            } 
            
            else{
                number.textContent = time;
            }
        },1000)
    }
    setTime()
})
